package com.zxy.permission_stu.controller;


import com.zxy.permission_stu.config.AjaxResult;
import com.zxy.permission_stu.entity.Classes;
import com.zxy.permission_stu.entity.Courses;
import com.zxy.permission_stu.service.ICoursesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lenovo
 * @since 2021-11-30
 */
@RestController
@RequestMapping("/courses")
public class CoursesController {

    @Autowired
    private ICoursesService coursesService;

    @RequestMapping("getCourses")
    public AjaxResult getCourses(){
        List<Courses> list = coursesService.list();
        return AjaxResult.ok(list);
    }
}
